package org.firebug.spring.boot.metadata.repository.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.firebug.spring.boot.metadata.repository.po.RegionPO;

import java.util.List;

/**
 * 地区:t_region
 */
@Mapper
public interface RegionDAO {
    @Select("select * from t_region where code=#{code}")
    RegionPO selectByCode(@Param("code") String code);

    @Select("select * from t_region where pcode=#{pcode} and enabled=true")
    List<RegionPO> selectByPcode(@Param("pcode") String pcode);
}